package com.gmu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author testjava
 * @since 2022-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TblMenu对象", description="权限表")
public class TblMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "权限id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "组件名")
    private String name;

    @ApiModelProperty(value = "菜单名")
    private String title;

    @ApiModelProperty(value = "路由地址")
    private String path;

    @ApiModelProperty(value = "权限标识")
    private String perms;

    @ApiModelProperty(value = "组件")
    private String component;

    @ApiModelProperty(value = "标志")
    private String icon;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:sss",timezone = "Asia/Shanghai")
    private Date createTime;

    @ApiModelProperty(value = "状态-1可用-0禁用")
    private String status;

    @ApiModelProperty(value = "父id")
    private String parentId;

    @ApiModelProperty(value = "删除标志-1删除-0存在")
    private String delFlag;

    @ApiModelProperty(value = "子菜单")
    @TableField(exist = false) //表中没有该字段，不被查询
    private List<TblMenu> children;

    @ApiModelProperty(value = "角色列表")
    @TableField(exist = false)
    private List<TblRole> roles;


}
